1. Field of the Invention
This invention is related in general to updating data in a disk memory unit and, more particularly, to an improved disk file control device and disk file control method.
2. Background of the Invention
It is known in the art to provide a disk memory unit (hereinafter referred to as "a disk unit", when applicable), with a fixed disk as a memory medium, as a peripheral device of a data processing unit such as a computer or work station. The disk unit is adapted to store data such as data prepared by the data processing unit, software and microcodes necessary for the operation of the data processing unit, and character patterns.
Of the data described above, the data formed by the data processing unit are transferred to the disk unit while being processed, so that a file in the disk unit is updated.
In the case where the system including the data processing unit and the disk unit is inactivated, for example by the interruption of the power supply (hereinafter referred to as a "system interruption", when applicable) before updating of the file is accomplished, data inputted after the system is activated again are sometimes inconsistent with that which had already been stored in the file.
One conventional technique for obviating this difficulty is described as follows with reference to FIGS. 9 and 10. FIG. 9 is a diagram showing an updating method for preventing the occurrence of the above-described data inconsistency.
As shown in FIG. 9, a data processing section 1 includes a volatile memory 2. The data formed by the data processing section 1 and stored in the volatile memory 2 is transferred to an FIFO queue 3 made up of a non-volatile memory. With the data thus stored in the FIFO queue 3, a file in a disk unit 4 is updated.
As was described above, the data formed by the data processing section is first transferred to the FIFO queue 3 into which data is written at a relatively high speed, and is then transferred to the file in the disk unit 4 in which data is written at a relatively low speed.
As a result, the probability is relatively low that a system interruption may occur while data is being written into the FIFO queue 3, because the data is written into the FIFO queue 3 at a relatively high speed. In contrast, data is transferred from the FIFO queue 3 to the file in the disk unit 4 at a relatively low speed. Therefore, the probability is relatively high that a system interruption may occur while data is being written into the file in the disk unit 4. However, even if a system interruption occurs during updating of the disk unit 4, the data will not be erased because the FIFO queue 3 has the non-volatile memory. Hence, upon reactivating the system, the data remaining in the FIFO queue 3 can again be transferred to the file in the disk unit 4. In such a case, the data written into the file in the disk unit 4 will be consistent with the data remaining in the FIFO queue 3.
The structure of the data stored in the FIFO queue 3 is shown in FIG. 10. The data stored in the FIFO queue 3 includes file identification data 5, and file page references 6-1 through 6-n. The file identification data is a symbol or name used to distinguish the particular file from others. The data written in each file page reference are data to be updated for the particular file page, and the position in the file where the data is written.
The structure of the data stored in the FIFO queue 3 is as described above. Therefore, upon reactivating the system after a system interruption, the data stored in the FIFO queue 3 are written in place in the file according to the data in the file page references.
Thus, the above-described updating method can prevent the undesirable result of the contents of the file becoming unacceptable upon reactivating the system after a system interruption.
However, the above-described conventional technique suffers from the following difficulties. The structure of the data formed in the FIFO queue 3 has no designating data necessary for extension or contraction of the file in the disk unit 4. As a result, extension or contraction of the file cannot be carried out, such file extension or contraction being necessary for an updating operation accompanied by an insertion or removal of data.
As a result, the above-described conventional technique can only perform an updating operation with the file remaining fixed in size. In other words, the conventional technique is applicable only to an updating operation which is not accompanied by data insertion or removal.